package com.igeek.compus.test.order.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

@Data
public class Order {

    private int id;
    // 订单号
    private String orderCode;
    // 父订单号
    private String parentOrder;
    // 打折前订单总金额
    private BigDecimal totalAmount;
    // 订单实际支付金额
    private BigDecimal amount;
    // 订单创建时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;
    // 订单创建时间戳
    private Long createTimeStamp;
    // 订单状态
    private Integer status;

    @Override
    public String toString() {
        return "Order{" +
                "id=" + id +
                ", orderCode='" + orderCode + '\'' +
                ", parentOrder='" + parentOrder + '\'' +
                ", totalAmount=" + totalAmount +
                ", amount=" + amount +
                ", createTime=" + createTime +
                ", createTimeStamp=" + createTimeStamp +
                ", status=" + status +
                '}';
    }
}
